package liangtWorkSpace.strategy.comparatorFile;

import liangtWorkSpace.strategy.comparableFile.Cat;

/**
 * @ClassName Dog
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/10 17:58
 */
public class CatWeightCpmparator implements Comparator<Cat> {
    public CatWeightCpmparator() {
    }

    @Override
    public int compare(Cat o1, Cat o2) {
        if (o1.weight < o2.weight )return -1;
        else if (o1.weight > o2.weight) return 1;
        else return 0;
    }
}
